package com.up.upzl.biz.domain;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;

import com.up.upzl.base.domain.BaseDomain;

import lombok.Getter;
import lombok.Setter;

/**
 * 角色
 * 
 * @author geeks
 *
 */
@Getter
@Setter
@Entity
public class SysRole extends BaseDomain {

	private static final long serialVersionUID = -5629493779558292494L;

	/**
	 * 账号
	 */
	@Column(length = 16, unique = true)
	private String roleName;

	/**
	 * 状态
	 */
	private Integer status;

	/**
	 * 应用
	 */
	@ManyToMany
	@JoinTable(name = "sys_role_app", joinColumns = @JoinColumn(name = "role_id"), inverseJoinColumns = @JoinColumn(name = "app_id"))
	private List<SysApp> sysApps;
}
